﻿using IH.Comm.Config;
using Microsoft.Extensions.Options;
using MongoDB.Driver;
using NAutowired.Core.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IH.Service
{
    public abstract class CoreService
    {
        [Autowired]
        private MongoClient _client { get; set; }

        [Autowired]
        protected IOptions<AppSettings> AppSettings { get; set; }
        protected IMongoDatabase AppStorage => _client.GetDatabase(AppSettings.Value.MongoConfigs.DbName);

    }
}
